From 1fd75e7150f0d132a4932dbd94777fff76afb8f0 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Tue, 23 Jan 2007 15:58:05 +0000 Subject: [PATCH] [LIBXC] Provide weak stub default implementations of xc_hvm_save() and xc_hvm_restore() for architectures with no full implementation. Signed-off-by: Keir Fraser --- tools/libxc/xg_private.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/tools/libxc/xg_private.c b/tools/libxc/xg_private.c index 1af646fc82..f45c2ebb0d 100644 --- a/tools/libxc/xg_private.c +++ b/tools/libxc/xg_private.c @@ -188,11 +188,32 @@ unsigned long csum_page(void *page) return sum ^ (sum>>32); } -__attribute__((weak)) int xc_hvm_build( - int xc_handle, - uint32_t domid, - int memsize, - const char *image_name) +__attribute__((weak)) +int xc_hvm_build(int xc_handle, + uint32_t domid, + int memsize, + const char *image_name) { - return -ENOSYS; + errno = ENOSYS; + return -1; +} + +__attribute__((weak)) +int xc_hvm_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, + uint32_t max_factor, uint32_t flags, + int (*suspend)(int domid)) +{ + errno = ENOSYS; + return -1; +} + +__attribute__((weak)) +int xc_hvm_restore(int xc_handle, int io_fd, uint32_t dom, + unsigned long nr_pfns, unsigned int store_evtchn, + unsigned long *store_mfn, unsigned int console_evtchn, + unsigned long *console_mfn, + unsigned int pae, unsigned int apic) +{ + errno = ENOSYS; + return -1; } -- 2.30.2